package com.maila.xiaoaoschool.activity;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.ImageView;

import com.cjj.MaterialRefreshLayout;
import com.maila.xiaoaoschool.R;
import com.maila.xiaoaoschool.adapter.SaleFoodAdapter;
import com.maila.xiaoaoschool.widget.NoScrollListView;
import com.zhy.autolayout.AutoRelativeLayout;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * Created by Administrator on 2017/10/17.
 */

public class SaleActivity extends AppCompatActivity {
    @BindView(R.id.white_return_iv)
    AutoRelativeLayout whiteReturnIv;
    @BindView(R.id.btn_new_user)
    ImageView btnNewUser;
    @BindView(R.id.btn_xianshi)
    ImageView btnXianshi;
    @BindView(R.id.btn_tejia)
    ImageView btnTejia;
    @BindView(R.id.btn_manjian)
    ImageView btnManjian;
    @BindView(R.id.btn_taocan)
    ImageView btnTaocan;
    @BindView(R.id.btn_fanquan)
    ImageView btnFanquan;
    @BindView(R.id.lv_meishi)
    NoScrollListView lvMeishi;
    @BindView(R.id.hot_refresh)
    MaterialRefreshLayout hotRefresh;
    SaleFoodAdapter saleFoodAdapter;
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_sale_activity);
        ButterKnife.bind(this);
        saleFoodAdapter=new SaleFoodAdapter(this);
        lvMeishi.setAdapter(saleFoodAdapter);
    }
    @Override
    protected void onResume() {
        super.onResume();
        requestViewFoucus(btnNewUser);
    }

    private void requestViewFoucus(View view) {
        view.setFocusable(true);
        view.setFocusableInTouchMode(true);
        view.requestFocus();
    }
    @OnClick({R.id.white_return_iv, R.id.btn_new_user, R.id.btn_xianshi, R.id.btn_tejia, R.id.btn_manjian, R.id.btn_taocan, R.id.btn_fanquan})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.white_return_iv:
                finish();
                break;
            case R.id.btn_new_user:
                break;
            case R.id.btn_xianshi:
                break;
            case R.id.btn_tejia:
                break;
            case R.id.btn_manjian:
                break;
            case R.id.btn_taocan:
                break;
            case R.id.btn_fanquan:
                break;
        }
    }
}
